import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login/Login'
import LoginPage from '@/components/Login/LoginPage/LoginPage'
import RegisterPage from '@/components/Login/RegisterPage/RegisterPage'
import Home from '@/components/Home'
import Product from '@/components/Product/Product'
import Cart from '@/components/Cart/Cart'
import Account from '@/components/Account/Account'
import Breadcrumb from '@/components/Breadcrumb/Breadcrumb'
import Order from '@/components/Account/Children/Order'
import Contact from '@/components/Account/Children/Contact'
import Wishlist from '@/components/Account/Children/Wishlist'
import Setting from '@/components/Account/Children/Setting'
import Ewallet from '@/components/Account/Children/Ewallet'
import Payment from '@/components/Account/Children/Payment'
import Chart from '@/components/Account/Children/Chart'
import Search from '@/components/Search/Search'
Vue.component('Breadcrumb', Breadcrumb)
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      component:Login,
      redirect:'/login',
      children:[
        {
          path:'/login',
          component:LoginPage
        },
        {
          path:'/register',
          component:RegisterPage
        },
      ]
    },
    {
      path:'/home',
      component:Home,
    },
    {
      path:'/product',
      component:Product
    },
    {
      path:'/cart',
      component:Cart
    },
    {
      path:'/account',
      component:Account,
      children:[
        {
          path:'order',
          component:Order
        },
        {
          path:'contact',
          component:Contact
        },
        {
          path:'wishlish',
          component:Wishlist
        },
        {
          path:'setting',
          component:Setting
        },
        {
          path:'ewallet',
          component:Ewallet
        },
        {
          path:'payment',
          component:Payment
        },
        {
          path:'chart',
          component:Chart
        }
      ]
    },
    {
      path:'/search',
      component:Search
    }
    
  ]
})
